package com.aaa.controller.scl;

import com.aaa.entity.LayData;
import com.aaa.entity.MyPage;
import com.aaa.entity.scl.SclRecord;
import com.aaa.entity.TjMessage;
import com.aaa.service.scl.SclRecordService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * (SclRecord)表控制层
 *
 * @author makejava
 * @since 2022-10-27 19:11:05
 */
@RestController
@RequestMapping("sclRecord")
public class SclRecordController {
    /**
     * 服务对象
     */
    @Autowired
    private SclRecordService sclRecordService;

    @GetMapping("checkrecord")
    public LayData checkUser(SclRecord record){
        return new LayData(sclRecordService.checkrecord(record));
    }

    @PostMapping("addrecord")
    public LayData addrecord(SclRecord record){

        return new LayData(sclRecordService.insertRecord(record));
    }

    @GetMapping("tj")
    public LayData getTongji(){

        return new LayData(sclRecordService.getTjData());
    }
    @GetMapping("tj2")
    public LayData getTongji2(MyPage myPage, TjMessage tjMessage){

        return new LayData(sclRecordService.getTjData2(myPage,tjMessage));
    }

}

